package com.cloud.controller.coupon;


import com.cloud.bean.coupon.CouponRule;
import com.cloud.common.BaseReturn;
import com.cloud.service.coupon.CouponRuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author liuyuan
 * @since 2022-08-06
 */
@RestController
@RequestMapping("/coupon-rule")
public class CouponRuleController {
    @Autowired
    CouponRuleService couponRuleService;

    @RequestMapping("listByBatchCouponId")
    public BaseReturn listByBatchCouponId(Long id){
      List<CouponRule> list =  couponRuleService.listByBatchCouponId(id);
      return BaseReturn.build("2000","查询成功",list);
    }

}

